﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using SelfMadeMillionaire.Core;
using SelfMadeMillionaire.Core.Entities;
using SelfMadeMillionaire.Core.Enums;
using SelfMadeMillionaire.Core.Repositories;
using SelfMadeMillionaire.Core.Services;
using SelfMadeMillionaire.Core.Specifications;

namespace SelfMadeMillionaire.BLL.Services
{
    public class MailingOpenLogService : IMailingOpenLogService
	{
		private readonly IMailingOpenLogRepository _mailingOpenLogRepository;

        public MailingOpenLogService(IMailingOpenLogRepository mailingOpenLogRepository)
		{
            _mailingOpenLogRepository = mailingOpenLogRepository;
		}

        public void Add(string mailing)
		{
            MailingOpenLog item = new MailingOpenLog();
            item.Mailing = mailing;
            item.AddDateTime = DateTime.Now;
            _mailingOpenLogRepository.Add(item);
		}        
	}
}